<% if @note %>
<div style="background-color:#ccffaa">

<%
  url = ""
  count = 0
  tokens = @note.relative_tokens()
  tokens.each do |token|
  puts url
    url = "#{url}/<a href='/#{tokens[0..count].join('/')}/list'>#{token}</a>"
    count = count + 1
  end
%>

<h2>Content at <%=url%></h2>
</div>
<div style="text-align:right">
<a href="<%= link 'edit' %>">edit this node</a>
| <a href="<%= link 'destroy' %>">destroy this node</a>
| <a href="<%= link 'create' %>">new</a>
</div>
<% end %>

<br/>
<table style="text-align:left; width:100%" >
<tr style="background:#ddffdd"><th width=60% > name </th><th> sponsor </th><th> handler </th><th>edit/rename</th><th>delete</th></tr>
<% if @notes %>
<% @notes.each do |note| %>
<tr>
<td><a href="<%=note.relative_url%>/list"><%=note.uid%></td>
<td><a href="<%=link note.get_sponsor_login,'user'%>"><%=note.get_sponsor_login%></a></td>
<td><%= note.handler %></td>
<td><a href="<%=note.relative_url%>/edit">[edit]</a></td>
<td><a href="<%=note.relative_url%>/destroy">[delete]</a></td>
</tr>
<% end %>
<% end %>
</table>
<br/>
